const Columns = [{
  title: '用户编码',
  dataIndex: 'id',
  key: 'id',
}, {
  title: '电子邮箱',
  dataIndex: 'email',
  key: 'email',
  sorter: (a, b) => a.email.length - b.email.length
}, {
  title: '用户名',
  dataIndex: 'username',
  key: 'username',
  sorter: (a, b) => a.username.length - b.username.length
},{
  title: '注册时间',
  dataIndex: 'create_at',
  key: 'create_at',
  sorter: (a, b) => Date.parse(a.create_at.replace(/-/g,"/")) - Date.parse(b.create_at.replace(/-/g,"/")),
},{
  title: '更新时间',
  dataIndex: 'updated_at',
  key: 'updated_at',
  sorter: (a, b) => Date.parse(a.updated_at.replace(/-/g,"/")) - Date.parse(b.updated_at.replace(/-/g,"/")),
},
  {
    title: '操作',
    dataIndex: 'opera',
    key: 'opera',
    render: (text, record) => (
      <span>
          <a onClick={this.showUserAndEdit.bind(this, record.id, record.key)}>查看详细/编辑</a>
        &nbsp;|&nbsp;
        <a onClick={this.deleteUser.bind(this, record.id, record.key)}>删除</a>
        </span>
    )
  }];

export default Columns;
